import { request } from '../../utils/request'
import type { phone, loginByCode } from '@/model/api/login'

export function phoneIsExist(data: phone){
    return request({
        url: '/userPhone/isExist',
        method: 'POST',
        data
    })
}

export function getCodeByPhone(data: phone) {
    return request({
        url: '/login/getLoginCode',
        method: 'POST',
        data
    })
}

export function loginByCode(data: loginByCode) {
    return request({
        url: '/login/loginByCode',
        method: 'POST',
        data
    })
}